package com.demo.framework.http;

import java.io.InputStream;
import java.io.OutputStream;

public abstract class BaseRequest {
    /**
     * HTTP GET, 将response写入OutputStream
     * 
     * @param url
     * @param output
     *            null 表示不需要response数据
     * @throws NetworkException
     */
    abstract public void get(String url, OutputStream output) throws HttpException;

    /**
     * 
     * @param url
     * @param input
     *            null表示无body数据
     * @param length
     * @param output
     *            null表示不需要response数据
     * @throws NetworkException
     */
    abstract public void post(String url, InputStream input, int length, OutputStream output) throws HttpException;



}
